package file;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        /*
        File file = new File("C:/Users/tedu/IdeaProjects/jsd2408/demo.text");
        File file1 = new File("./demo.text");*/
        File file = new File("./demo.txt");
        System.out.println(file.getName());//文件名
        System.out.println(file.length());//文件大小
        System.out.println(file.canRead());//是否可读
        System.out.println(file.canWrite());//是否可写
        System.out.println(file.isHidden());//文件是否隐藏

    }
}
